<%@ page language="java" import="java.util.*,java.awt.*,java.awt.image.*,com.sun.image.codec.jpeg.*" contentType="text/html;charset=GBK" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  
  <body>
   <%
     response.setHeader("pragma","no-cache");
     response.setHeader("cache-control","no-cache");
     response.setDateHeader("Expires",0);
     String name="loginCode"; %>
     验证码：<img src="authen.jsp?name=<%=name %>"/>
     <form method="post">
     	<input type="text" name="code" />
     	<input type="submit" value="提交"/>
     </form>
     <br/>
     <%
     	String code = request.getParameter("code");
        if(code!=null){
        	String sCode = (String)session.getAttribute("loginCode");
        	if(sCode.equals(code)){
        		out.println("loginCode right");
        	}
        	else{
        		out.println("loginCode error");
        	}
        }
     %>
  </body>
</html>